import { 
  Button,
  Form,
  Input,
  Tabs,
  Layout,
  Menu,
  Card,
  Row,
  Col,
  message,
  PageHeader,
} from 'ant-design-vue';

import { MessageApi } from 'ant-design-vue/lib/message'

const components: Array<any> = [
  Button,
  Form,
  Input,
  Tabs,
  Layout,
  Menu,
  Card,
  Row,
  Col,
  PageHeader,
]

declare module '@vue/runtime-core' {
  interface ComponentCustomProperties {
    $message: MessageApi
  }
}

export default {
  install(app: any) {
    components.forEach(app.use)
    app.config.globalProperties.$message = message
  }
}